package com.koron.css2.contractmanage.Enum;


/**
 * 合同类型枚举
 *
 * @author 李文浩
 * @version YH230315
 * @date 2023/4/18 09:10
 */
public enum ContractTypeEnum {

    CONTRACT_TYPE_0("0", "电子供水合同"),//营收
    CONTRACT_TYPE_1("1", "普通供水合同"),//营收
    CONTRACT_TYPE_2("2", "电子供水合同"),//报装
    CONTRACT_TYPE_3("3", "普通供水合同"),//报装
    CONTRACT_TYPE_4("4", "电子施工合同"),//报装
    CONTRACT_TYPE_5("5", "普通施工合同");//报装

    /**
     * 合同类型
     */
    private String contractType;

    /**
     * 合同类型名称
     */
    private String contractTypeName;

    ContractTypeEnum(String contractType, String contractTypeName) {
        this.contractType = contractType;
        this.contractTypeName = contractTypeName;
    }

    public String getContractType() {
        return contractType;
    }

    public void setContractType(String contractType) {
        this.contractType = contractType;
    }

    public String getContractTypeName() {
        return contractTypeName;
    }

    public void setContractTypeName(String contractTypeName) {
        this.contractTypeName = contractTypeName;
    }

    public static String getContractTypeName(String contractType) {
        ContractTypeEnum[] contractTypeEnums = values();
        for (ContractTypeEnum contractTypeEnum : contractTypeEnums) {
            if (contractTypeEnum.getContractType().equals(contractType)) {
                return contractTypeEnum.getContractTypeName();
            }
        }
        return null;
    }
}
